import { GET_CONFERENCE, INIT_CONFERENCE } from '../actions/conference';
const INITIAL_STATE = { };
export default function (state = INITIAL_STATE, action) {
    let channelsStr = "";
    switch (action.type) {
        case GET_CONFERENCE:
            state.channels = action.payload.data;
            channelsStr = JSON.stringify(state.channels);
            sessionStorage.channels = channelsStr;
            return { ...state};
        case INIT_CONFERENCE:
            state.channels = [];
            channelsStr = JSON.stringify(state.channels);
            sessionStorage.channels = channelsStr;
            return {...state};
        default:
            return state;
    }
}